<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">

    <title>RAC</title>

    <!-- Bootstrap Core CSS -->
    <link href="/xnqb/Public/Rac/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">

    <!-- MetisMenu CSS -->
    <link href="/xnqb/Public/Rac/vendor/metisMenu/metisMenu.min.css" rel="stylesheet">

    <!-- Custom CSS -->
    <link href="/xnqb/Public/Rac/dist/css/sb-admin-2.css" rel="stylesheet">

    <!-- Morris Charts CSS -->
    <link href="/xnqb/Public/Rac/vendor/morrisjs/morris.css" rel="stylesheet">

    <!-- Custom Fonts -->
    <link href="/xnqb/Public/Rac/vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
		 <link href="/xnqb/Public/Rac/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css">
	<!-- DataTables CSS -->
    <!-- <link href="/xnqb/Public/Rac/vendor/datatables-plugins/dataTables.bootstrap.css" rel="stylesheet"> -->

    <!-- DataTables Responsive CSS -->
    <!-- <link href="/xnqb/Public/Rac/vendor/datatables-responsive/dataTables.responsive.css" rel="stylesheet"> -->
    
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    
    	<style>
	th{
		text-align:center;
	}
	
	.error {
	color:red
}
.parsley-error {
	border-color:#f32f53
}
.parsley-errors-list {
	display:none;
	margin:0;
	padding:0
}
.parsley-errors-list.filled {
	display:block
}
.parsley-errors-list>li {
	font-size:12px;
	list-style:none;
	color:#f32f53;
	margin-top:5px
}
	</style>
	
	
	<style>
      	.search_title_span{
      		display: inline-block;
      		
      		text-align: right;
      	}
      	.search_input{
      		display: inline-block;
      		width: 50%;
      	}
      	.col-sm-3{
      		margin-top: 10px;
      	}
      </style>
		
	<link href="/xnqb/Public/Rac/select2/dist/css/select2.min.css" rel="stylesheet">
	
	<style>
	th{
		text-align:center;
	}
	</style>
</head>

<body>

    <div id="wrapper">

        <!-- Navigation -->
        <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="index.html"><?php echo (L("_rac_")); ?></a>
            </div>
            <!-- /.navbar-header -->

            <ul class="nav navbar-top-links navbar-right">



                <!-- <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        <i class="fa fa-bell fa-fw"></i> <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-alerts">
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-comment fa-fw"></i> New Comment
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-twitter fa-fw"></i> 3 New Followers
                                    <span class="pull-right text-muted small">12 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-envelope fa-fw"></i> Message Sent
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-tasks fa-fw"></i> New Task
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a href="#">
                                <div>
                                    <i class="fa fa-upload fa-fw"></i> Server Rebooted
                                    <span class="pull-right text-muted small">4 minutes ago</span>
                                </div>
                            </a>
                        </li>
                        <li class="divider"></li>
                        <li>
                            <a class="text-center" href="#">
                                <strong>See All Alerts</strong>
                                <i class="fa fa-angle-right"></i>
                            </a>
                        </li>
                    </ul>
                </li> -->
                
                <!-- /.dropdown -->

                <li><a href="?l=zh-cn">中文</a></li>           
                <li>|</li>
                <li><a href="?l=en-us">English</a></li>
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                    	&nbsp;admin&nbsp;
                        <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user">
                        <!-- <li><a href="#"><i class="fa fa-user fa-fw"></i> User Profile</a>
                        </li>
                        <li><a href="#"><i class="fa fa-gear fa-fw"></i> </a>
                        </li> -->
                        <li class="divider"></li>
                        <li><a href="<?php echo U('Login/logout');?>"><i class="fa fa-sign-out fa-fw"></i> <?php echo (L("_logout_")); ?></a>
                        </li>
                    </ul>
                    <!-- /.dropdown-user -->
                </li>
                <!-- /.dropdown -->
            </ul>
            <!-- /.navbar-top-links -->
            

            <div class="navbar-default sidebar" role="navigation">
            
            	
                <div class="sidebar-nav navbar-collapse">
                    <ul class="nav" id="side-menu">
                        <?php if(is_array($nav)): $i = 0; $__LIST__ = $nav;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><li>
                        	<!-- <?php if($vo["nav_state"] == 'open'): echo ($vo["nav_url"]); else: ?>#<?php endif; ?> -->
                            	<a href='/xnqb/<?php if($vo["nav_state"] == 'open'): echo ($vo["nav_url"]); else: ?>#<?php endif; ?>'><i class="fa <?php echo ($vo["nav_icon"]); ?> fa-fw"></i> <?php echo ($vo["lang"]); ?></a>
                       	    
                        	
	                        	<?php if(!empty($vo["child"])): ?><ul class="nav nav-second-level">
	                        			<?php if(is_array($vo["child"])): $i = 0; $__LIST__ = $vo["child"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><li>
			                                    <a href="/xnqb/<?php echo ($v["nav_url"]); ?>"><?php echo ($v["lang"]); ?></a>
			                                </li><?php endforeach; endif; else: echo "" ;endif; ?>
	
		                            </ul><?php endif; ?>
                        	
                        	</li><?php endforeach; endif; else: echo "" ;endif; ?>
                        
                        
                        
                    </ul>
                </div>
                <!-- /.sidebar-collapse -->
            </div>
            <!-- /.navbar-static-side -->
        </nav>   
 	

        <div id="page-wrapper">
            <div class="row">
                <div class="col-lg-12">
                    <h1 class="page-header"><?php echo (L("_nav_hang_sell_list_")); ?></h1>
                </div>
                <!-- /.col-lg-12 -->
            </div>

            <div class="row">
                <div class="col-lg-12">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                        	<?php echo (L("_nav_hang_sell_list_")); ?>
                        	<span style="padding-left:20px;"><?php echo (L("_static_integral_")); ?>(<?php echo ($sell_static_money_rate); ?>): <?php echo (L("_storage_money_")); ?>(<?php echo ($sell_savings_money_rate); ?>): <?php echo (L("_service_charge_")); ?>(<?php echo ($sell_service_rate); ?>)</span>
                        	<span style="color:red; float: right;  margin: 0 100px 0 20px"><?php echo (L("_checked_")); ?>:
                        		<span class="select_total">0</span>
                        	</span>
                        	
                        	<span style="color:red; float: right;"><?php echo (L("_releasable_total_amount_")); ?>:<?php echo ($can_release_integral_total); ?></span>
                        	
                        </div>
                        
                        <!-- /.panel-heading -->
                        <div class="panel-body">
                        	<form action="<?php echo U('Sell/index');?>" method="get">
                        	
                        	<input  name="search_tab"  value="<?php echo ($_GET['search_tab']); ?>"  type="hidden" >
                        	
                        	<div class="row" style="margin-bottom: 10px;">
                            	
                            		
                            		<div class="col-sm-12">
                            			<span class=""><?php echo (L("_username_")); ?>：</span>
                            			<input  name="member_account"  value="<?php echo ($_GET['member_account']); ?>" placeholder="请输入用户名, 多用户请用分号隔开，如：test1,test2" type="text" class="form-control search_input" >
                            			<!-- <input  name="member_account"  value="<?php echo ($_GET['member_account']); ?>" placeholder="请输入用户名" type="text" class="form-control search_input" > -->
                            			<!-- <select name="member_account" class=" form-control search_input" >
                            				<?php if(is_array($all_member)): $i = 0; $__LIST__ = $all_member;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["id"]); ?>"><?php echo ($vo["account"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                            			</select> -->
                            		</div>
   
                             </div>
                            	
                            		
                            <div class="row" style="margin-bottom: 20px;">
                                  <div class="col-sm-3">
                            			<span class=""><?php echo (L("_matcher_name_")); ?>：</span>
                            			<!-- <input  name="matcher_name" value="<?php echo ($_GET['matcher_name']); ?>" type="text" class="form-control search_input" > -->
                            			<select name="matcher_id" class=" form-control search_input">
                            				<option value=""><?php echo (L("_please_choose_")); ?></option>
                            				<?php if(is_array($matcher)): $i = 0; $__LIST__ = $matcher;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><option value="<?php echo ($vo["id"]); ?>" <?php if($vo['id'] == $matcher_id ): ?>selected<?php endif; ?> ><?php echo ($vo["name"]); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                            			</select>
                            		</div>
                            		
                            		<div class="col-sm-3">
                            			<span class=""><?php echo (L("_selling_date_")); ?></span>
                            			<input name="sell_start_date" value="<?php echo ($_GET['sell_start_date']); ?>" class="form-control search_input form_datetime" style="width: 55%"/>
                            		</div>
                            		<div class="col-sm-3">
                            			<span class=""><?php echo (L("_sold_date_")); ?></span>
                            			<input name="sell_end_date" value="<?php echo ($_GET['sell_end_date']); ?>" class="form-control search_input form_datetime" style="width: 55%"/>
                            		</div>
                            		
                            		<div class="col-sm-3">
                            			<span class=""><?php echo (L("_state_")); ?>：</span>
                            			<select name="state" class="form-control search_input">
                            			    <?php if($state == 2 ): ?><option value=""><?php echo (L("_please_choose_")); ?></option>
                                               		<option value="1"><?php echo (L("_under_review_")); ?></option>
                          				            <option value="2" selected><?php echo (L("_already_sell_")); ?></option> 
                          				            <option value="3"><?php echo (L("_freeze_")); ?></option> 
                          				    <?php elseif($state == 1 ): ?> 
                          				            <option value=""><?php echo (L("_please_choose_")); ?></option> 
                          				            <option value="1" selected><?php echo (L("_under_review_")); ?></option>
                          				            <option value="2"><?php echo (L("_already_sell_")); ?></option>  
                          				             <option value="3"><?php echo (L("_freeze_")); ?></option>    
                          				    <?php elseif($state == 3 ): ?> 
                          				            <option value=""><?php echo (L("_please_choose_")); ?></option> 
                          				            <option value="1" ><?php echo (L("_under_review_")); ?></option>
                          				            <option value="2"><?php echo (L("_already_sell_")); ?></option>  
                          				             <option value="3" selected><?php echo (L("_freeze_")); ?></option>                       				           	                                        
											<?php else: ?> 
											        <option value="" selected><?php echo (L("_please_choose_")); ?></option>
													<option value="1"><?php echo (L("_under_review_")); ?></option>
                          				            <option value="2"><?php echo (L("_already_sell_")); ?></option>   
                          				             <option value="3"><?php echo (L("_freeze_")); ?></option><?php endif; ?>
                            			</select>
                            		</div>                            		

                            </div>
                            
                            
                             <div class="row">
                            		<div class="col-xs-8 col-sm-10">
                            			<button type="submit" name="search_type" value="search1"  class="search1 btn btn-primary btn-sm"><?php echo (L("_search_")); ?></button>
                            			<button type="submit" name="search_type" value="search2" class="search2 btn btn-primary btn-sm"><?php echo (L("_network_search_")); ?></button>
                            			<!-- <a type="button" class="btn btn-primary btn-sm team_sell">团队一键挂卖</a> -->                            			
                            		</div>
                            		
                            		<div class="col-xs-2 col-sm-2">
                            		   <a type="button" style="" class="btn btn-primary btn-sm select_sell_button"><?php echo (L("_selected_sell_")); ?></a>
                            	    </div>                           		
                            </div>
                            

                            		
                            		
                            </form>
                            	
                            
                        </div>
                        	
                        	

                        <!-- /.panel-heading -->
                        <div class="panel-body">
                            <!-- Nav tabs -->
                            <ul class="nav nav-tabs">
                            	
                                <li class="active" style="text-align: center;">

                                	<a href="#home" class="mytab" id="tab1" data-toggle="tab" aria-expanded="true"><?php echo (L("_capital_return_below_")); ?>
                                		
                                	</a>
                                    
                                	
                                </li>
                                <li class="" style="text-align: center;"><a href="#profile" class="mytab" id="tab2" data-toggle="tab" aria-expanded="false"><?php echo (L("_capital_return_")); echo ($can_release_integral_total_rate2); ?>%</a>
                                	<!-- <input id="cb" data-flag="recovery1"  class="my_checkbox" type="checkbox" > -->
                                </li>
                                <li class="" style="text-align: center;"><a href="#messages" class="mytab" id="tab3" data-toggle="tab" aria-expanded="false"><?php echo (L("_retun_more_than_")); echo ($can_release_integral_total_rate3); ?>%</a>
                                	<!-- <input id="cb" data-flag="recovery2"  class="my_checkbox" type="checkbox" > -->
                                </li>
                                <li class="" style="text-align: center;"><a href="#settings" class="mytab" id="tab4" data-toggle="tab" aria-expanded="false"><?php echo (L("_freeze_list_")); ?></a>
                                	<!-- <input id="cb" data-flag="recovery3"  class="my_checkbox" type="checkbox" > -->
                                </li>
                            </ul>

                            <!-- Tab panes -->
                            <div class="tab-content">
                                <div class="tab-pane fade active in" id="home">
                                
                                    <div class="table-responsive">
			                                <table class="table table-striped table-bordered table-hover text-center">
			                                    <thead>
			                                        <tr>
			                                            <th >
			                                            	<?php echo (L("_check_all_")); ?><input id="cb" class="select_checkbox_all" type="checkbox" > <br/>
                                							<?php echo (L("_check_invert_")); ?><input id="cb" class="select_checkbox_back_all" type="checkbox" > 
			                                            </th>
			                                            <th><?php echo (L("_username_")); ?></th>
			                                            <th><?php echo (L("_matcher_name_")); ?></th>
			                                            <th><?php echo (L("_money_")); ?></th> 
			                                            <th><?php echo (L("_date_")); ?></th>                                           
			                                            <th><?php echo (L("_state_")); ?></th>
			                                            
			                                            <th><?php echo (L("_release_integral_")); ?></th>
			                                            <th><?php echo (L("_points_released_")); ?></th>
			                                            <th><?php echo (L("_passive_return_rate_")); ?></th>
			                                            <!-- <th><?php echo (L("_static_money_")); ?></th> -->
			                                            <th><?php echo (L("_passive_return_total_")); ?></th>
			                                            <th><?php echo (L("_active_total_")); ?></th>
			                                            
			                                            
			                                            <th><?php echo (L("_static_money_")); ?></th>
			                                                                                  
			                                            <th><?php echo (L("_storage_money_")); ?></th>
			                                                                                     
			                                            <th><?php echo (L("_service_charge_")); ?></th>
			                                           
			                                            <th><?php echo (L("_sell_under_review_date_")); ?></th>
			                                            <th><?php echo (L("_operation_")); ?></th>
			                                        </tr>
			                                    </thead>
			                                    <tbody class="notRecovery">
			                                        
			                                            <?php if(is_array($data["notRecovery"]["list"])): $k = 0; $__LIST__ = $data["notRecovery"]["list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><tr>
			                                            		
				                                            	<td>
				                                            		<?php echo ($k); ?>
				                                            		<?php if($k != 1): ?><input name="select_check" value="<?php echo ($vo["id"]); ?>" class="select_checkbox_one" type="checkbox"/><?php endif; ?>
				                                            		
				                                            	</td>
				                                            	
				                                            	<td><?php echo ($vo["member_account"]); ?></td>
				                                            	<td><?php echo ($vo["matcher_name"]); ?></td>
				                                            	<td class="sell_money"><?php echo ($vo["money"]); ?></td>
				                                            	
				                                            	<td><?php echo ($vo["create_date"]); ?></td>		                                            	
				                                            	<td>
				                                            		<?php if($vo["state"] == 1): echo (L("_under_review_")); ?>
				                                            		<?php elseif($vo["state"] == 2): ?>
				                                            			<?php echo (L("_already_sell_")); ?>
				                                            		<?php elseif($vo["state"] == 3): ?>
				                                            			<?php echo (L("_freeze_")); endif; ?>	                                            		
				                                            	</td>	
				                                            	
				                                            	
				                                            	<td><?php echo ($vo["member_release_integral"]); ?></td>
				                                            	<td><?php echo ($vo["member_release_static_integral_total"]); ?></td>
				                                            	<td><?php echo ($vo['member_recovery_rate']*100); ?>%</td>
				                                            	<!-- <td><?php echo ($vo["member_static_money"]); ?></td> -->
				                                            	<td><?php echo ($vo["member_static_money_total"]); ?></td>
				                                            	<td><?php echo ($vo["member_dynamic_money_total"]); ?></td>
				                                            	
				                                            	
				                                            	
				                                            	                                            		                                            	
				                                            	<td><?php echo ($vo["static_money"]); ?></td>
				                                            	
				                                            	
				                                            	
				                                            	<td><?php echo ($vo["savings_money"]); ?></td>
				                                            	
				                                            	
				                                            	<td><?php echo ($vo["service_money"]); ?></td>
				                                            	
				                                            	
				                                            	<td><?php echo ($vo["sell_date"]); ?></td>
				                                            	<td>
				                                            		<?php if($vo["state"] == 1): ?><button type="button" data-id="<?php echo ($vo["id"]); ?>" class="btn btn-primary btn-sm success_button"><?php echo (L("_approved_")); ?></button>
				                                            			<button type="button" data-id="<?php echo ($vo["id"]); ?>" class="btn btn-primary btn-sm not_success_button"><?php echo (L("_not_approve_")); ?></button><?php endif; ?>	                                           		
				                                            	</td>
															</tr><?php endforeach; endif; else: echo "" ;endif; ?>                                                                                
			                                    </tbody>
			                                </table>
			                                
			                                
			                                <div class="pull-right">
													<ul class="pagination">
														<?php echo ($data["notRecovery"]["page"]); ?>
													</ul>
											</div>
			                            </div>
			                            
                                    
                                </div>
                                <div class="tab-pane fade" id="profile">
                                    
                                    <div class="table-responsive">
			                                <table class="table table-striped table-bordered table-hover text-center">
			                                    <thead>
			                                        <tr>
			                                            <th>
			                                            	<?php echo (L("_check_all_")); ?><input id="cb" class="select_checkbox_all2" type="checkbox" > <br/>
                                							<?php echo (L("_check_invert_")); ?><input id="cb" class="select_checkbox_back_all2" type="checkbox" > 
			                                            </th>
			                                            <th><?php echo (L("_username_")); ?></th>
			                                            <th><?php echo (L("_matcher_name_")); ?></th>
			                                            <th><?php echo (L("_money_")); ?></th> 
			                                            <th><?php echo (L("_date_")); ?></th>                                           
			                                            <th><?php echo (L("_state_")); ?></th>
			                                            
			                                            <th><?php echo (L("_release_integral_")); ?></th>
                                                        <th><?php echo (L("_points_released_")); ?></th>
                                                        <th><?php echo (L("_passive_return_rate_")); ?></th>
                                                        <th><?php echo (L("_static_money_")); ?></th>
                                                        <th><?php echo (L("_passive_return_total_")); ?></th>
                                                        <th><?php echo (L("_active_total_")); ?></th>
			                                            
			                                            
			                                            <th><?php echo (L("_static_money_")); ?></th>
			                                                                              
			                                            <th><?php echo (L("_storage_money_")); ?></th>
			                                                                                    
			                                            <th><?php echo (L("_service_charge_")); ?></th>
			                                           
			                                            <th><?php echo (L("_sell_under_review_date_")); ?></th>
			                                            <th><?php echo (L("_operation_")); ?></th>
			                                        </tr>
			                                    </thead>
			                                    <tbody  class="recovery1">
			                                        
			                                            <?php if(is_array($data["recovery1"]["list"])): $k = 0; $__LIST__ = $data["recovery1"]["list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><tr>
				                                            	<td><?php echo ($k); ?>
				                                            		<?php if($k != 1): ?><input name="select_check2" value="<?php echo ($vo["id"]); ?>" class="select_checkbox_one2" type="checkbox"/><?php endif; ?>
				                                            	</td>
				                                            	<td><?php echo ($vo["member_account"]); ?></td>
				                                            	<td><?php echo ($vo["matcher_name"]); ?></td>
				                                            	<td class="sell_money"><?php echo ($vo["money"]); ?></td>
				                                            	<td><?php echo ($vo["create_date"]); ?></td>		                                            	
				                                            	<td>
                                                                    <?php if($vo["state"] == 1): echo (L("_under_review_")); ?>
                                                                    <?php elseif($vo["state"] == 2): ?>
                                                                        <?php echo (L("_already_sell_")); ?>
                                                                    <?php elseif($vo["state"] == 3): ?>
                                                                        <?php echo (L("_freeze_")); endif; ?>                                                       
                                                                </td>   
				                                            	
				                                            	
				                                            	<td><?php echo ($vo["member_release_integral"]); ?></td>
				                                            	<td><?php echo ($vo["member_release_static_integral_total"]); ?></td>
				                                            	<?php if(empty($vo["member_recovery_rate"])): else: ?>
				                                            		<td><?php echo ($vo['member_recovery_rate'] * 100); ?>%</td><?php endif; ?>
				                                            	<td><?php echo ($vo["member_static_money"]); ?></td>
				                                            	<td><?php echo ($vo["member_static_money_total"]); ?></td>
				                                            	<td><?php echo ($vo["member_dynamic_money_total"]); ?></td>
				                                                           		                                            	
				                                            	<td><?php echo ($vo["static_money"]); ?></td>

				                                            	<td><?php echo ($vo["savings_money"]); ?></td>
				                                          
				                                            	<td><?php echo ($vo["service_money"]); ?></td>
				                            
				                                            	<td><?php echo ($vo["sell_date"]); ?></td>
				                                            	<td>
				                                            		<?php if($vo["state"] == 1): ?><button type="button" data-id="<?php echo ($vo["id"]); ?>" class="btn btn-primary btn-sm success_button"><?php echo (L("_approved_")); ?></button>
				                                            			<button type="button" data-id="<?php echo ($vo["id"]); ?>" class="btn btn-primary btn-sm not_success_button"><?php echo (L("_not_approve_")); ?></button><?php endif; ?>	                                           		
				                                            	</td>
															</tr><?php endforeach; endif; else: echo "" ;endif; ?>                                                                                
			                                    </tbody>
			                                </table>
			                                
			                                
			                                <div class="pull-right">
													<ul class="pagination">
														<?php echo ($data["recovery1"]["page"]); ?>
													</ul>
											</div>
			                            </div>
                                    
                                    
                                </div>
                                <div class="tab-pane fade" id="messages">
                                    
                                    <div class="table-responsive">
			                                <table class="table table-striped table-bordered table-hover text-center">
			                                    <thead>
			                                        <tr>
			                                            <th>
			                                            	<?php echo (L("_check_all_")); ?><input class="select_checkbox_all3" type="checkbox" > <br/>
                                							<?php echo (L("_check_invert_")); ?><input  class="select_checkbox_back_all3" type="checkbox" > 
			                                            </th>
			                                            <th><?php echo (L("_username_")); ?></th>
			                                            <th><?php echo (L("_matcher_name_")); ?></th>
			                                            <th><?php echo (L("_money_")); ?></th> 
			                                            <th><?php echo (L("_date_")); ?></th>                                           
			                                            <th><?php echo (L("_state_")); ?></th>
			                                            
			                                            <th><?php echo (L("_release_integral_")); ?></th>
                                                        <th><?php echo (L("_points_released_")); ?></th>
                                                        <th><?php echo (L("_passive_return_rate_")); ?></th>
                                                        <th><?php echo (L("_static_money_")); ?></th>
                                                        <th><?php echo (L("_passive_return_total_")); ?></th>
                                                        <th><?php echo (L("_active_total_")); ?></th>
			                                            
			                                            
			                                            <th><?php echo (L("_static_money_")); ?></th>
                                                                                          
                                                        <th><?php echo (L("_storage_money_")); ?></th>
                                                                                                
                                                        <th><?php echo (L("_service_charge_")); ?></th>
                                                       
                                                        <th><?php echo (L("_sell_under_review_date_")); ?></th>
                                                        <th><?php echo (L("_operation_")); ?></th>
			                                        </tr>
			                                    </thead>
			                                    <tbody class="recovery2">
			                                        
			                                            <?php if(is_array($data["recovery2"]["list"])): $k = 0; $__LIST__ = $data["recovery2"]["list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><tr>
				                                            	<td><?php echo ($k); ?>
				                                            		<?php if($k != 1): ?><input name="select_check3" value="<?php echo ($vo["id"]); ?>" class="select_checkbox_one3" type="checkbox"/><?php endif; ?>
				                                            	</td>
				                                            	<td><?php echo ($vo["member_account"]); ?></td>
				                                            	<td><?php echo ($vo["matcher_name"]); ?></td>
				                                            	<td class="sell_money"><?php echo ($vo["money"]); ?></td>
				                                            	<td><?php echo ($vo["create_date"]); ?></td>		                                            	
				                                            	<td>
                                                                    <?php if($vo["state"] == 1): echo (L("_under_review_")); ?>
                                                                    <?php elseif($vo["state"] == 2): ?>
                                                                        <?php echo (L("_already_sell_")); ?>
                                                                    <?php elseif($vo["state"] == 3): ?>
                                                                        <?php echo (L("_freeze_")); endif; ?>                                                       
                                                                </td>   
				                                            	
				                                            	
				                                            	<td><?php echo ($vo["member_release_integral"]); ?></td>
				                                            	<td><?php echo ($vo["member_release_static_integral_total"]); ?></td>
				                                            	<?php if(empty($vo["member_recovery_rate"])): else: ?>
				                                            		<td><?php echo ($vo['member_recovery_rate'] * 100); ?>%</td><?php endif; ?>
				                                            	<td><?php echo ($vo["member_static_money"]); ?></td>
				                                            	<td><?php echo ($vo["member_static_money_total"]); ?></td>
				                                            	<td><?php echo ($vo["member_dynamic_money_total"]); ?></td>
				                                                                               		                                            	
				                                            	<td><?php echo ($vo["static_money"]); ?></td>
				                                            	
				                                            	<td><?php echo ($vo["savings_money"]); ?></td>
				                                         
				                                            	<td><?php echo ($vo["service_money"]); ?></td>
				                                           
				                                            	<td><?php echo ($vo["sell_date"]); ?></td>
				                                            	<td>
				                                            		<?php if($vo["state"] == 1): ?><button type="button" data-id="<?php echo ($vo["id"]); ?>" class="btn btn-primary btn-sm success_button"><?php echo (L("_approved_")); ?></button>
				                                            			<button type="button" data-id="<?php echo ($vo["id"]); ?>" class="btn btn-primary btn-sm not_success_button"><?php echo (L("_not_approve_")); ?></button><?php endif; ?>	                                           		
				                                            	</td>
															</tr><?php endforeach; endif; else: echo "" ;endif; ?>                                                                                
			                                    </tbody>
			                                </table>
			                                
			                                
			                                <div class="pull-right">
													<ul class="pagination">
														<?php echo ($data["recovery2"]["page"]); ?>
													</ul>
											</div>
			                            </div>
                                    
                                </div>
                                <div class="tab-pane fade" id="settings">
                                    
                                    <div class="table-responsive">
			                                <table class="table table-striped table-bordered table-hover text-center">
			                                    <thead>
			                                        <tr>
			                                            <th>
			                                            	<?php echo (L("_check_all_")); ?><input class="select_checkbox_all4" type="checkbox" > <br/>
                                							<?php echo (L("_check_invert_")); ?><input  class="select_checkbox_back_all4" type="checkbox" > 
			                                            </th>
			                                            <th><?php echo (L("_username_")); ?></th>
			                                            <th><?php echo (L("_matcher_name_")); ?></th>
			                                            <th><?php echo (L("_money_")); ?></th> 
			                                            <th><?php echo (L("_date_")); ?></th>                                           
			                                            <th><?php echo (L("_state_")); ?></th>
			                                            
			                                            <th><?php echo (L("_release_integral_")); ?></th>
                                                        <th><?php echo (L("_points_released_")); ?></th>
                                                        <th><?php echo (L("_passive_return_rate_")); ?></th>
                                                        <th><?php echo (L("_static_money_")); ?></th>
                                                        <th><?php echo (L("_passive_return_total_")); ?></th>
                                                        <th><?php echo (L("_active_total_")); ?></th>
                                                        
                                                        
                                                        <th><?php echo (L("_static_money_")); ?></th>
                                                                                          
                                                        <th><?php echo (L("_storage_money_")); ?></th>
                                                                                                
                                                        <th><?php echo (L("_service_charge_")); ?></th>
                                                       
                                                        <th><?php echo (L("_sell_under_review_date_")); ?></th>
                                                        <th><?php echo (L("_operation_")); ?></th>
			                                        </tr>
			                                    </thead>
			                                    <tbody class="recovery3">
			                                        
			                                            <?php if(is_array($data["recovery3"]["list"])): $k = 0; $__LIST__ = $data["recovery3"]["list"];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($k % 2 );++$k;?><tr>
				                                            	<td><?php echo ($k); ?>
				                                            		<?php if($k != 1): ?><input name="select_check4" value="<?php echo ($vo["id"]); ?>" class="select_checkbox_one4" type="checkbox"/><?php endif; ?>
				                                            	</td>
				                                            	<td><?php echo ($vo["member_account"]); ?></td>
				                                            	<td><?php echo ($vo["matcher_name"]); ?></td>
				                                            	<td class="sell_money"><?php echo ($vo["money"]); ?></td>
				                                            	<td><?php echo ($vo["create_date"]); ?></td>		                                            	
				                                            	<td>
                                                                    <?php if($vo["state"] == 1): echo (L("_under_review_")); ?>
                                                                    <?php elseif($vo["state"] == 2): ?>
                                                                        <?php echo (L("_already_sell_")); ?>
                                                                    <?php elseif($vo["state"] == 3): ?>
                                                                        <?php echo (L("_freeze_")); endif; ?>                                                       
                                                                </td>   
				                                            	
				                                            	
				                                            	<td><?php echo ($vo["member_release_integral"]); ?></td>
				                                            	<td><?php echo ($vo["member_release_static_integral_total"]); ?></td>
				                                            	
				                                            	<?php if(empty($vo["member_recovery_rate"])): else: ?>
				                                            		<td><?php echo ($vo['member_recovery_rate'] * 100); ?>%</td><?php endif; ?>
				                                            	
				                                            	
				                                            	<td><?php echo ($vo["member_static_money"]); ?></td>
				                                            	<td><?php echo ($vo["member_static_money_total"]); ?></td>
				                                            	<td><?php echo ($vo["member_dynamic_money_total"]); ?></td>
		                                            		                                            	
				                                            	<td><?php echo ($vo["static_money"]); ?></td>
				                                            	
				                                            	<td><?php echo ($vo["savings_money"]); ?></td>
				                                            	
				                                            	<td><?php echo ($vo["service_money"]); ?></td>
				                                            	
				                                            	<td><?php echo ($vo["sell_date"]); ?></td>
				                                            	<td>
				                                            		<?php if($vo["state"] == 3): ?><button type="button" data-id="<?php echo ($vo["id"]); ?>" class="btn btn-primary btn-sm return_examine"><?php echo (L("_under_review_return_")); ?></button><?php endif; ?>	                                           		
				                                            	</td>
															</tr><?php endforeach; endif; else: echo "" ;endif; ?>                                                                                
			                                    </tbody>
			                                </table>
			                                
			                                
			                                <div class="pull-right">
													<ul class="pagination">
														<?php echo ($data["recovery3"]["page"]); ?>
													</ul>
											</div>
			                            </div>
                                    
                                </div>
                            </div>
                        </div>


                        </div>
                        <!-- /.panel-body -->
                    </div>
                    <!-- /.panel -->
                </div>
                <!-- /.col-lg-6 -->
                <!-- /.col-lg-6 -->
            </div>
            
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
 
    <script src="/xnqb/Public/Rac/vendor/jquery/jquery.min.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="/xnqb/Public/Rac/vendor/bootstrap/js/bootstrap.min.js"></script>

    <!-- Metis Menu Plugin JavaScript -->
    <script src="/xnqb/Public/Rac/vendor/metisMenu/metisMenu.min.js"></script>

    <!-- Morris Charts JavaScript -->
    <script src="/xnqb/Public/Rac/vendor/raphael/raphael.min.js"></script>
    <!-- <script src="/xnqb/Public/Rac/vendor/morrisjs/morris.min.js"></script>
    <script src="/xnqb/Public/Rac/data/morris-data.js"></script> -->

    <!-- Custom Theme JavaScript -->
    <script src="/xnqb/Public/Rac/dist/js/sb-admin-2.js"></script>
    
    <script src="/xnqb/Public/Rac/layer/layer.js"></script>
   
    <script src="/xnqb/Public/Rac/js/bootstrap-datetimepicker.min.js"></script>
  <!--  <script type="text/javascript">
	$(function () {
		    $("#chinese").click(function(){
			  alert(1);
			});
	});
	
	</script>   -->  
    <!-- <script src="/xnqb/Public/Rac/vendor/datatables/js/jquery.dataTables.min.js"></script>
    <script src="/xnqb/Public/Rac/vendor/datatables-plugins/dataTables.bootstrap.min.js"></script>
    <script src="/xnqb/Public/Rac/vendor/datatables-responsive/dataTables.responsive.js"></script> -->
    <script src="/xnqb/Public/Rac/select2/dist/js/select2.full.js"></script>
    <script src="/xnqb/Public/Rac/select2/dist/js/i18n/zh-CN.js"></script>
    
    <!-- <script type="text/javascript">
        $(function () {
             $('.search1').click(function () {
            	 var member_account = $(".my_select2").val();
            	 var matcher_id = $('select[name=matcher_id]').val();
            	 var sell_start_date = $('input[name=sell_start_date]').val();
            	 var sell_end_date = $('input[name=sell_end_date]').val();
            	 var state = $('select[name=state]').val();
            	 
            	 var now_href = window.location.href;
            	 
            	 location.href = 
             });
        });
    </script> -->
    <script src="/xnqb/Public/Rac/my_js/sell.js" type="text/javascript"></script>
	<script type="text/javascript">
	
		$(function () {
			
			$('.select_sell_button').click(function () {
				var ids = [];
				$('input[name="select_check"]:checked').each(function(){ 
					ids.push($(this).val());
				}); 
				
				$('input[name="select_check2"]:checked').each(function(){ 
					ids.push($(this).val());
				}); 
				
				$('input[name="select_check3"]:checked').each(function(){ 
					ids.push($(this).val());
				}); 
				
				$('input[name="select_check4"]:checked').each(function(){ 
					ids.push($(this).val());
				}); 
				
				if (ids.length == 0) {
					layer.msg('<?php echo (L("_please_check_")); ?>');
					return false;
				}
				$.ajax({
			   	    type: "POST",
			   	    url: "<?php echo U('Sell/adopt_select');?>",
			   	    data: {
			   	    	id : ids.join(',')
			   	    },// 要提交的表单
			   	    dataType: 'json',
			   	    beforeSend: function(){
							layer_index = layer.load(1, {
							  	shade: [0.1, '#ccc'] //0.1透明度的白色背景
							});
						},
			   	    success: function (data, response) {
			   	    	layer.close(layer_index);
			   	    	if (data.flag > 0) {
			   	    		location.reload();
			   	    		layer.msg(data.msg);
			   	    	} else {
			   	    		layer.msg(data.msg);
			   	    	}
			   	    },
			   	    error: function (error) {
			   	    	layer.close(layer_index);
			   	    	layer.msg('error');
			   	    }
			   	  });
			});
			
			
			
			// 返回审核
			$('.return_examine').click(function () {
				var id = $(this).data('id');
				layer.confirm('<?php echo (L("_sure_need_to_return")); ?>？', {
          		  btn: ['<?php echo (L("_confirm_")); ?>','<?php echo (L("_close_")); ?>'] //按钮
          		}, function(){
          			$.ajax({
    	           	    type: "POST",
    	           	    url: "<?php echo U('Sell/return_examine');?>",
    	           	    data: {
    	           	    	id : id
    	           	    },// 要提交的表单
    	           	    dataType: 'json',
    	           	    beforeSend: function(){
    	   					layer_index = layer.load(1, {
    	   					  	shade: [0.1, '#ccc'] //0.1透明度的白色背景
    	   					});
    	   				},
    	           	    success: function (data, response) {
    	           	    	layer.close(layer_index);
    	           	    	if (data.flag > 0) {
    	           	    		location.reload();
    	           	    		layer.msg(data.msg);
    	           	    	} else {
    	           	    		layer.msg(data.msg);
    	           	    	}
    	           	    },
    	           	    error: function (error) {
    	           	    	layer.close(layer_index);
    	           	    	layer.msg('error');
    	           	    }
    	           	});
          		});
			});
			
			
			/* var select_total = 0;
			$('.my_checkbox').click(function (e) {
				
				var checked = $(this).attr('checked');

				var flag = $(this).data('flag');
				var $tr = $('.' + flag).find('tr');
				if ($tr.length > 0) {
					var money_total = $tr.eq(0).find('.money_total').html();
					if (money_total) {
						money_total = parseFloat(money_total);
						money_total = Math.floor(money_total * 100) / 100;
					}
					
					if($(this).is(':checked')){
						select_total += money_total;
					} else {
						select_total -= money_total;
					}
					
					$('.select_total').html(select_total);
				}
				//$(this).attr('checked', 'checked');
				
			}); */
			
			
			// 团队一键挂卖
			$('.team_sell').click(function () {
				var member_account = $(".my_select2").val();
				var matcher_id = $('select[name=matcher_id]').val();
				var state = $('select[name=state]').val();
				var sell_start_date = $('input[name=sell_start_date]').val();
				var sell_end_date = $('input[name=sell_end_date]').val();
				
				var select_flag = [];
				$('.my_checkbox').each(function () {
					if($(this).is(':checked')){
						select_flag.push($(this).data('flag'));
					}
				});
				if (select_flag.length <= 0) {
					layer.msg('<?php echo (L("_please_check_")); ?>');
					return false;
				}
				$.ajax({
	           	    type: "POST",
	           	    url: "<?php echo U('Sell/adopt');?>",
	           	    data: {
	           	    	member_account : member_account,
	           	    	matcher_id : matcher_id,
	           	    	state : state,
	           	    	sell_start_date : sell_start_date,
	           	    	sell_end_date : sell_end_date,
	           	    	select_flag : select_flag.join(',')
	           	    },// 要提交的表单
	           	    dataType: 'json',
	           	    beforeSend: function(){
	   					layer_index = layer.load(1, {
	   					  	shade: [0.1, '#ccc'] //0.1透明度的白色背景
	   					});
	   				},
	           	    success: function (data, response) {
	           	    	layer.close(layer_index);
	           	    	if (data.flag > 0) {
	           	    		location.reload();
	           	    		layer.msg(data.msg);
	           	    	} else {
	           	    		layer.msg(data.msg);
	           	    	}
	           	    },
	           	    error: function (error) {
	           	    	layer.close(layer_index);
	           	    	layer.msg('error');
	           	    }
	           	  });
	        	  
				
			});
			
			$('.mytab').click(function () {
				var v = $(this).attr('id');
				$('input[name=search_tab]').val(v);
			});
			var sss = '<?php echo ($_GET['search_tab']); ?>';
			if (sss != '') {
				$('#' + sss).tab('show');
			}
			
			
			$(".form_datetime").datetimepicker({
	    		format: 'yyyy-mm-dd', autoclose:true,
	    		minView : 2,
	    		initialDate : new Date()
	    	});
			
			/* $(".my_select2").select2({
				language: "zh-CN"});
			var $myselect2 = $(".my_select2").select2(); */
			
			/* var member_account_json = <?php echo ($member_account_json); ?>;
			$myselect2.val(member_account_json).trigger("change"); */
			
			$(".form_datetime").datetimepicker({
				format: 'yyyy-mm-dd hh:ii',
	    		autoclose:true});
			
			$('.not_success_button').click(function () {
				var id = $(this).data('id');
				var layer_index = null;
	           	$.ajax({
	           	    type: "POST",
	           	    url: "<?php echo U('Sell/not_adopt');?>",
	           	    data: {
	           	    	id : id
	           	    },// 要提交的表单
	           	    dataType: 'json',
	           	    beforeSend: function(){
	   					layer_index = layer.load(1, {
	   					  	shade: [0.1, '#ccc'] //0.1透明度的白色背景
	   					});
	   				},
	           	    success: function (data, response) {
	           	    	layer.close(layer_index);
	           	    	if (data.flag > 0) {
	           	    		location.reload();
	           	    		layer.msg(data.msg);
	           	    	} else {
	           	    		layer.msg(data.msg);
	           	    	}
	           	    },
	           	    error: function (error) {
	           	    	layer.close(layer_index);
	           	    	layer.msg('error');
	           	    }
	           	  });
	        	  
	        	 return false;
			});
			
			
			
			$('.success_button').click(function () {
				var id = $(this).data('id');
				var layer_index = null;
	           	$.ajax({
	           	    type: "POST",
	           	    url: "<?php echo U('Sell/adopt');?>",
	           	    data: {
	           	    	id : id
	           	    },// 要提交的表单
	           	    dataType: 'json',
	           	    beforeSend: function(){
	   					layer_index = layer.load(1, {
	   					  	shade: [0.1, '#ccc'] //0.1透明度的白色背景
	   					});
	   				},
	           	    success: function (data, response) {
	           	    	layer.close(layer_index);
	           	    	if (data.flag > 0) {
	           	    		location.reload();
	           	    		layer.msg(data.msg);
	           	    	} else {
	           	    		layer.msg(data.msg);
	           	    	}
	           	    },
	           	    error: function (error) {
	           	    	layer.close(layer_index);
	           	    	layer.msg('error');
	           	    }
	           	  });
	        	  
	        	 return false;
			});
		});
	</script>
</body>

</html>